package com.letoken.platform.repo.sss.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * otc信息表
 * </p>
 *
 * @author 作者
 * @since 2024-09-05
 */
@Getter
@Setter
@TableName("user_otc_info")
@ApiModel(value = "UserOtcInfo对象", description = "otc信息表")
public class UserOtcInfo extends Model<UserOtcInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("售出的代币")
    @TableField("from_token_id")
    private Integer fromTokenId;

    @ApiModelProperty("得到的代币")
    @TableField("to_token_id")
    private Integer toTokenId;

    @ApiModelProperty("账户")
    @TableField("user")
    private String user;

    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("1.买 2.卖")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("1.发布中 2.已完成 3.已取消")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("单价")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty("数量")
    @TableField("quantity")
    private BigDecimal quantity;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("已成交数量")
    @TableField("sum_quantity")
    private BigDecimal sumQuantity;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
